﻿using Noke.Common.DatabaseAccess;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noke.Common.Model
{
    public class UpdateModel<T>
    {
        public bool IsByKey { get; set; }
        public T Entity { get; set; }

        private List<string> updateColumns = new List<string>();
        //public List<string> UpdateColumns
        //{
        //    get { return updateColumns; }
        //}

        public UpdateModel<T> Add(string UpdateColumn)
        {
            this.updateColumns.Add(UpdateColumn);
            return this;
        }

        internal string GetSQL()
        {
            string sql = "";

            return sql;
        }

        internal DbParameter[] GetParameters()
        {
            DatabaseConnectionType type = DatabaseAccessConfig.GetInstance().DbConnectionType;
            string prefix = DatabaseAccessConfig.GetInstance().Prefix;
            int num = updateColumns.Count;
            DbParameter[] list = new DbParameter[num];




            return list;
        }

    }
}
